[PATCH] Add clamping to QColorTransferGenericFunction
authorSamuel Gaist <samuel.gaist@idiap.ch>
Sat, 24 May 2025 19:07:37 +0000 (21:07 +0200)
committerMiao Wang <shankerwangmiao@gmail.com>
Mon, 4 May 2026 08:21:36 +0000 (16:21 +0800)
commitb65f25e9a47fb6f9b1cfb558d3102df7f359e561
tree33b62a88eebb0d92649de2a2ce8ab0c844dfaed0
parent51c338bcee8865eaf3bb994ba6f71fd70a69e9f1
[PATCH] Add clamping to QColorTransferGenericFunction

This ensures that the inputs are within range for the use of these
function.

Depending on the values passed, they can trigger FE_INVALID errors
and thus NaN as return values.

This can happen for example when feeding an invalid ICC profile to
QColorSpace::fromIccProfile.

Credit to OSS-Fuzz

Fixes: QTBUG-137159
Origin: upstream, https://download.qt.io/official_releases/qt/6.8/CVE-2025-5992-qtbase-6.8.patch

Gbp-Pq: Name upstream_cve-2025-5992_input_range_qcolortransformation.diff
src/gui/painting/qcolortransfergeneric_p.h